/*
 * @Author: 0x9DEFA478
 * @Date: 2025-02-28 17:12:39
 * @LastEditTime: 2025-09-13 23:47:05
 * @LastEditors: 0x9DEFA478
 * @Description: 
 * 
 * 
 */
#ifndef hConcurrency_H_Concurrency_Empty_HPP_
#define hConcurrency_H_Concurrency_Empty_HPP_
#include "H_Type.hpp"
#if __cplusplus >= 202000L
#include <concepts>
#endif


namespace H{

#if __cplusplus >= 202000L
  namespace Concept{
    template<typename T>
    concept event=requires(T& e,usize time){
      {e.TryAcquire()}->std::same_as<bool>;
      e.Acquire();
      {e.Acquire(time)}->std::same_as<bool>;
      {e.Acquire_us(time)}->std::same_as<bool>;
      e.Trigger();
    };

    template<typename T>
    concept lock=requires(T& l){
      l.Lock();
      l.Unlock();
    };
  }
#endif

  namespace Concurrency{

    class EmptyEvent{

      public:
        EmptyEvent(){}
        ~EmptyEvent(){}

        bool TryAcquire(){return true;}
        void Acquire(){}
        bool Acquire(usize Timeout){return true;}
        bool Acquire_us(usize Timeout){return true;}
        void Trigger(){}
    };

    class EmptyLock{

      public:
        EmptyLock(){}
        ~EmptyLock(){}

        void Lock(){}
        void Unlock(){}
    };

  }

}


#endif //hConcurrency_H_Concurrency_Empty_HPP_
